<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title></title>
<link rel="stylesheet" href="/Public/Admin/css/pintuer.css">
<link rel="stylesheet" href="/Public/Admin/css/admin.css">
<script src="/Public/Admin/js/jquery.js"></script>
<script src="/Public/Admin/js/pintuer.js"></script>
</head>
<body>

  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 充值列表</strong> <a href="" style="  float:right; display:none;">添加字段</a></div>
    <!--<?php if($_SESSION['type'] == 1): ?>-->
	  <!--<div class="padding border-bottom">-->
		<!--<form action="/Admin/Index/money" method="get">-->
		  <!--<ul class="search" style="padding-left:10px;">-->
			  <!--<input type="text" placeholder="请输入搜索关键字" name="keywords" class="input" style="width:250px; line-height:17px;display:inline-block" value="<?php echo ($keywords); ?>" />-->
			  <!--&lt;!&ndash;<a href="javascript:void(0)" class="button border-main icon-search" onclick="changesearch()" > 搜索</a>&ndash;&gt;-->
			  <!--<input type="submit" class="button border-main icon-search" value="搜索">-->
		  <!--</ul>-->
		<!--</form>-->
    <!--</div>-->
	<!--<?php endif; ?>-->
    <table class="table table-hover text-center">
      <tr>
		  <th width="100" style=" padding-left:20px;">ID</th>
		  <th>用户</th>
		  <th>充值金额</th>
		  <th>充值时间</th>
      </tr>
		<?php if(is_array($lists)): $i = 0; $__LIST__ = $lists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
				<td style=" padding-left:20px;"><?php echo ($vo["id"]); ?></td>
				<td><?php echo ($vo["name"]); ?></td>
				<td><?php echo ($vo["money"]); ?></td>
				<td><?php echo ($vo["add_time"]); ?></td>
			</tr><?php endforeach; endif; else: echo "" ;endif; ?>
		<tr>
			<td colspan="6">
				<div class="pagelist">
					<a href="/Admin/Index/money/page/0">首页</a>
					<a href="/Admin/Index/money/page/<?php echo ($pages['page']-1); ?>">上一页</a>
					<?php if(is_array($pages["num"])): foreach($pages["num"] as $key=>$p): if($p-1 == $pages['page']): ?><span class="current"><?php echo ($p); ?></span>
							<?php else: ?>
							<a href="/Admin/Index/money/page/<?php echo ($p-1); ?>"><?php echo ($p); ?></a><?php endif; endforeach; endif; ?>
					<a href="/Admin/Index/money/page/<?php echo ($pages['page']+1); ?>">下一页</a>
					<a href="/Admin/Index/money/page/<?php echo ($pages['total']); ?>">尾页</a>
				</div>
			</td>
		</tr>
    </table>
  </div>

<script type="text/javascript">
	$("body").bind("keydown",function(event){
		if (event.keyCode == 116) {
			event.preventDefault(); //阻止默认刷新
			//location.reload();
			//采用location.reload()在火狐下可能会有问题，火狐会保留上一次链接
			location=location;
		}
	})

//单个删除
function del(id){
	if(confirm("您确定要删除吗?")){
		$.ajax({
			url:"/Admin/Index/userDel",
			type:"get",
			data:{
				'id':id
			},
			success:function(data){
				if(data){
					alert("删除成功");
					location.reload();
				}
				else alert("删除失败");
			}

		})
	}
}

//全选
$("#checkall").click(function(){ 
  $("input[name='id[]']").each(function(){
	  if (this.checked) {
		  this.checked = false;
	  }
	  else {
		  this.checked = true;
	  }
  });
})

//批量删除
function DelSelect(){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {		
		Checkbox=true;	
	  }
	});
	if (Checkbox){
		var t=confirm("您确认要删除选中的内容吗？");
		if (t==false) return false;		
		$("#listform").submit();		
	}
	else{
		alert("请选择您要删除的内容!");
		return false;
	}
}

//批量排序
function sorts(){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {		
		Checkbox=true;	
	  }
	});
	if (Checkbox){	
		
		$("#listform").submit();		
	}
	else{
		alert("请选择要操作的内容!");
		return false;
	}
}


//批量首页显示
function changeishome(o){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {		
		Checkbox=true;	
	  }
	});
	if (Checkbox){
		
		$("#listform").submit();	
	}
	else{
		alert("请选择要操作的内容!");		
	
		return false;
	}
}

//批量推荐
function changeisvouch(o){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {		
		Checkbox=true;	
	  }
	});
	if (Checkbox){
		
		
		$("#listform").submit();	
	}
	else{
		alert("请选择要操作的内容!");	
		
		return false;
	}
}

//批量置顶
function changeistop(o){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {		
		Checkbox=true;	
	  }
	});
	if (Checkbox){		
		
		$("#listform").submit();	
	}
	else{
		alert("请选择要操作的内容!");		
	
		return false;
	}
}


//批量移动
function changecate(o){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {		
		Checkbox=true;	
	  }
	});
	if (Checkbox){		
		
		$("#listform").submit();		
	}
	else{
		alert("请选择要操作的内容!");
		
		return false;
	}
}

//批量复制
function changecopy(o){
	var Checkbox=false;
	 $("input[name='id[]']").each(function(){
	  if (this.checked==true) {		
		Checkbox=true;	
	  }
	});
	if (Checkbox){	
		var i = 0;
	    $("input[name='id[]']").each(function(){
	  		if (this.checked==true) {
				i++;
			}		
	    });
		if(i>1){ 
	    	alert("只能选择一条信息!");
			$(o).find("option:first").prop("selected","selected");
		}else{
		
			$("#listform").submit();		
		}	
	}
	else{
		alert("请选择要复制的内容!");
		$(o).find("option:first").prop("selected","selected");
		return false;
	}
}

</script>
</body>
</html>